refactor(dashboard): Command Center β page pass + polish (slices 8-9)#4815
Conversation
Slice 8. Sweep remaining pages + approval surfaces to Command Center tokens: pages (Login, Metrics, Cost, Analytics, Audit, Pipelines, Routines, Activity) and approval chrome (ApprovalBanner, AcpApprovalModal, PermissionPromptSheet). Purple -> amber; frosted surfaces -> solid navy tokens; borders -> --color-border; numeric values -> font-mono; status -> getStatusStyle where applicable. No layout/feature/state changes. tsc clean; build passes. Executed via an aegis-driven Claude Code session. Generated by Hephaestus (Aegis dev agent)
β¦ced-motion (Β§5) Slice 9 (final). Polish pass: - Amber :focus-visible ring baseline across interactive surfaces. - Working-status dot: calm amber pulse (1.6s); guarded by prefers-reduced-motion. - Removed dead fragments referencing retired tokens/classes. - Minor consistency fixes (CommandPalette, TerminalDebugTab, SessionTable). No behavior changes. tsc clean; build passes. Executed via an aegis-driven Claude Code session. Generated by Hephaestus (Aegis dev agent)
There was a problem hiding this comment.
Changes Requested
PR: #4815 β Command Center page pass + polish (slices 8-9)
Gate Status
| Gate | Status | Notes |
|---|---|---|
| 1. Review completed | β | Full diff reviewed |
| 2. No conflicts | β | MERGEABLE |
| 3. CI green | β | 1 test failure |
| 4-6. Regressions/Tests/E2E | β³ | Blocked by CI |
| 7. Documented | β | PR body clear |
| 8. Security clean | β | No secrets |
| 9. Targets develop | β | Correct base |
The Problem
CI Failure: test (ubuntu-latest, 20) β dashboard E2E test failure:
FAIL src/__tests__/PipelinesPage.test.tsx > PipelinesPage > shows step count for each pipeline
TestingLibraryElementError: Unable to find an element with the text: /2 steps/.
Root Cause: The PR wraps {pipeline.stages.length} in a <span className="font-mono"> in PipelinesPage.tsx. This splits the text "2 steps" across two DOM elements. The test uses screen.getByText(/2 steps/) which expects text in a single element.
Fix Required
Update PipelinesPage.test.tsx line ~120 to use a custom text matcher, or revert the font-mono wrapper on the step count.
Other Notes
- Clean, focused refactor. +35/-36 across 16 files. Good scope discipline.
- Design token migration consistent with #4814.
- Focus ring and dead code removal look correct.
Please fix the test and re-push. I will re-review immediately.
There was a problem hiding this comment.
Changes Requested (Re-review)
PR: #4815 β Command Center page pass + polish (slices 8-9)
Fix Status
The test fix commit (d0e9465) addresses the original getByText(/2 steps/) failure correctly β the custom text matcher using element?.textContent === "2 steps" is the right approach for split text across elements.
New Problem
CI still red. Build step fails with:
src/__tests__/PipelinesPage.test.tsx(123,43): error TS6133: 'content' is declared but its value is never read.
Line 123 in the fix commit:
const stepCount = screen.getByText((content, element) =>
element?.textContent === "2 steps"
);The (content, element) callback declares content but never uses it. TypeScript strict mode (TS6133) rejects unused parameters.
Fix Required
Replace with underscore prefix or omit the parameter:
const stepCount = screen.getByText((_content, element) =>
element?.textContent === "2 steps"
);Or use a type-assertion approach if the testing-library types require both params.
Gate Status
| Gate | Status | Notes |
|---|---|---|
| 1. Review completed | β | Re-reviewed |
| 2. No conflicts | β | MERGEABLE |
| 3. CI green | β | TS6133 unused parameter |
| 4-9. Remaining gates | β³ | Blocked by CI |
One-line fix. Push and I will re-review immediately.
β¦enter redesign The PR wraps numeric values in font-mono spans, splitting text across elements. Update getByText(/2 steps/) to use a custom text matcher that checks parent textContent instead of relying on contiguous text.
d0e9465 to
488403c
Compare
There was a problem hiding this comment.
β Approved
All gates pass:
| Gate | Status |
|---|---|
| 1. Review completed | β Full diff re-reviewed |
| 2. No conflicts | β MERGEABLE |
| 3. CI green | β All checks pass (run 28326801723) |
| 4. No regressions | β dashboard-e2e, test (ubuntu-20/22), platform-smoke all green |
| 5. Unit tests | β Test fix verified (custom text matcher for split font-mono elements) |
| 6. E2E/UAT | β dashboard-e2e green |
| 7. Documented | β PR body describes slices 8-9 clearly |
| 8. Security clean | β No secrets, GitGuardian + Gitleaks + Trivy green |
| 9. Targets develop | β Correct base |
The TS6133 unused-parameter fix (_content prefix) resolves the build failure. Clean token migration across 16 files, consistent with #4814. Ready to merge.
Aegis version
Developed with: v${v}
What
Follow-up to the Command Center redesign (#4814, merged). Applies the design tokens + patterns to the remaining pages and adds the final polish slice.
Slices
Verify
Driven via aegis (Claude Code sessions reading `dashboard/DESIGN.md`), same loop as #4814.
Generated by Hephaestus (Aegis dev agent)